import { request } from '@/sheep/request';
import { CRUD } from '@/sheep/request/crud';
import { EXPORT } from '@/sheep/request/export';
const route = {
  path: 'withdraw',
  name: 'shop.admin.withdraw',
  component: () => import('@/app/shop/admin/withdraw/index.vue'),
  meta: {
    title: '提现',
  },
};

const api = {
  ...CRUD('shop/admin/withdraw', ['list']),
  handle: (id, data) =>
    request({
      url: 'shop/admin/withdraw/handle/' + id,
      method: 'POST',
      data,
    }),
  log: (id) =>
    request({
      url: 'shop/admin/withdraw/log/' + id,
      method: 'GET',
    }),
  export: (type, params) => EXPORT(`/shop/admin/withdraw/${type}`, params),
};

export { route, api };
